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..9a468989c3 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..e61509af92 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..0afb8ad46c 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,13 @@ 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 return request_info end ## @@ -112,15 +109,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 +129,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..aa0b022468 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..246b159b3d 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..827c1acb23 --- /dev/null +++ b/lib/admin/microsoft365_apps/installation_options/installation_options_request_builder.rb @@ -0,0 +1,162 @@ +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 + 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..754cd6d8c3 --- /dev/null +++ b/lib/admin/microsoft365_apps/microsoft365_apps_request_builder.rb @@ -0,0 +1,165 @@ +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 + 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..a8b27ae808 --- /dev/null +++ b/lib/admin/people/item_insights/item_insights_request_builder.rb @@ -0,0 +1,162 @@ +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 + 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/photos/count/count.rb b/lib/admin/people/profile_card_properties/count/count.rb similarity index 100% rename from lib/groups/item/photos/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/invitations/item/item.rb b/lib/admin/people/profile_card_properties/item/item.rb similarity index 100% rename from lib/invitations/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..68d8e8cff7 --- /dev/null +++ b/lib/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.rb @@ -0,0 +1,165 @@ +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 + 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/permission_grants/item/restore/restore.rb b/lib/admin/people/profile_card_properties/profile_card_properties.rb similarity index 100% rename from lib/groups/item/permission_grants/item/restore/restore.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/team/permission_grants/item/restore/restore.rb b/lib/admin/people/pronouns/pronouns.rb similarity index 100% rename from lib/groups/item/team/permission_grants/item/restore/restore.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/invitations/item/invited_user/invited_user.rb b/lib/admin/report_settings/report_settings.rb similarity index 100% rename from lib/invitations/item/invited_user/invited_user.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..d6ee1aa277 --- /dev/null +++ b/lib/admin/report_settings/report_settings_request_builder.rb @@ -0,0 +1,159 @@ +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 + 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..7ad27a9faa 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..9ef80272c3 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..5c620ff9ef 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..40f8c09c45 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..74983651f7 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..6e9411a64f 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,32 @@ 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 + 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') return request_info end ## @@ -86,17 +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 - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_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..97fcba7726 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..304efc3a02 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,32 @@ 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 + 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') return request_info end ## @@ -81,16 +109,25 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..2391e327cc 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,13 @@ 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 return request_info end ## @@ -104,15 +101,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 +121,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..6258720362 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,13 @@ 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 return request_info end ## @@ -106,15 +103,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 +123,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..dc2349938b 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..e8f326453a 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..1175dd09af 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..40c9aea66f 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..61d3a3f442 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,13 @@ 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 return request_info end ## @@ -106,15 +103,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 +123,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..9a202b2d26 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..7f6e99e860 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..101f377283 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,31 @@ 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 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 +115,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..03e062d3dd 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..8051eb15aa 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,31 @@ 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 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 +113,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..16ca53f57f 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..f7a263c03f 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,13 @@ 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 return request_info end ## @@ -100,19 +97,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 +117,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..5a19b4e452 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,23 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..a4be12e089 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 have been registered in a directory, including through multi-tenant 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 have been registered in a directory, including through multi-tenant 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..db19d9f0cf 100644 --- a/lib/applications/item/add_key/add_key_request_builder.rb +++ b/lib/applications/item/add_key/add_key_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::KeyCredential.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 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..637ed7b729 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,23 @@ 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 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..52ea7a5999 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,42 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + 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 + 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 +111,48 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..67e4d7fa83 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,13 @@ 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 return request_info end ## @@ -214,19 +221,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 +241,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..637cfb153d 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..b7704b8ee3 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,13 @@ 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 return request_info end ## @@ -92,19 +89,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 +109,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/invitations/item/invited_user/mailbox_settings/mailbox_settings.rb b/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name.rb similarity index 100% rename from lib/invitations/item/invited_user/mailbox_settings/mailbox_settings.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..b4d569d550 --- /dev/null +++ b/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder.rb @@ -0,0 +1,163 @@ +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 + 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..031e00104f 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,32 @@ 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 + 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') return request_info end ## @@ -77,16 +105,25 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..1891a55495 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,23 @@ 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 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..1b3b1c6cf5 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,46 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + 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 + 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 +111,51 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e4fdec8261 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..69ff89edee 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..01b976242a 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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 ## @@ -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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..050317dcd6 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..1c7b731704 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/me/activities/activities.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload.rb similarity index 100% rename from lib/me/activities/activities.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..82d61e2841 --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload_request_builder.rb @@ -0,0 +1,177 @@ +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 + 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..4ae026e8bd --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/bulk_upload/value/content_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 '../../../../../../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 + 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') + 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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/me/activities/count/count.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/value/value.rb similarity index 100% rename from lib/me/activities/count/count.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..853b8df5b7 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..6695ccd46a 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..cf6995066d 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,13 @@ 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 return request_info end ## @@ -106,15 +103,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 +123,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..2a100b0d38 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,35 @@ 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 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 +137,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..ab1232d1d7 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,34 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..3e7ec10d46 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,41 @@ 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 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 +153,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..6807748ce9 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..61b8a9284d 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c9df6cd93b 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,31 @@ 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 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 +131,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..37128a4e74 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,13 @@ 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 return request_info end ## @@ -106,15 +103,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 +123,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..796c27a4ad 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,13 @@ 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 return request_info end ## @@ -120,15 +117,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 +137,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..f0d6ac6962 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,31 @@ 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 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 +117,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..e9d3c003f1 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,23 @@ 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 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..749b0f9baa 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,42 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + 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 + 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 +111,48 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..a5d669f975 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,23 @@ 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 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..b81c302c24 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,42 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + 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 + 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 +111,48 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..2c82168004 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..a723ff3d96 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..8ead261190 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,13 @@ 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 return request_info end ## @@ -87,19 +84,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 +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 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/me/activities/item/history_items/count/count.rb b/lib/applications_with_unique_name/applications_with_unique_name.rb similarity index 100% rename from lib/me/activities/item/history_items/count/count.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..35454a44f8 --- /dev/null +++ b/lib/applications_with_unique_name/applications_with_unique_name_request_builder.rb @@ -0,0 +1,157 @@ +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 + 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..80e8dbac46 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,31 @@ 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 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 +107,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..29a93db6d0 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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/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/item/sign_in_item_request_builder.rb b/lib/audit_logs/sign_ins/item/sign_in_item_request_builder.rb index 3c1ea4e985..a22bc37144 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,31 @@ 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 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 +107,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..9f75173a90 100644 --- a/lib/audit_logs/sign_ins/sign_ins_request_builder.rb +++ b/lib/audit_logs/sign_ins/sign_ins_request_builder.rb @@ -38,10 +38,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 +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::SignInCollectionResponse.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::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 +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 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..ad66da6220 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..3d9907f2aa 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..7602407d91 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..d1cf2ce100 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 that a user is a participant in, including one-on-one chats, group chats, and meeting chats. ## @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 that a user is a participant in, including one-on-one chats, group chats, and meeting chats. ## @param request_configuration Configuration for the request such 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 that a user is a participant in, including one-on-one chats, group chats, and meeting chats. 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..55b8f1a17f 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,23 @@ 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 return request_info end ## @@ -160,15 +157,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 +177,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..147919d619 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..ac7c8fe200 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,13 @@ 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 return request_info end ## @@ -110,15 +107,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 +127,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..870e0f305c 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c5e0861e67 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,31 @@ 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 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 +107,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..ff9be4591b 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..db937ebbfa 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..7318f986fa 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,31 @@ 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 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 +109,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..d607412875 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,13 @@ 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 return request_info end ## @@ -128,15 +125,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 +145,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..aabdd1158b 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..b7f00a4b37 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,44 @@ 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 + 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') 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 +113,25 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..4da06441c4 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,31 @@ 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 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 +143,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..90681590a3 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,31 @@ 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 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 +123,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..ef0fe057e5 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,44 @@ 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 + 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') 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 +117,25 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..974d5d30dd 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..5c06e37936 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..4eaa26220a 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b40b68eae5 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..6535723a63 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..fd98ec27d6 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..f68955ef70 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c74a8f6f64 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..ecd54732c2 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,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::ChatMessageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Send a new chatMessage in the specified channel or a chat. + ## Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. ## @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 @@ -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,19 +83,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 ## - ## Send a new chatMessage in the specified channel or a chat. + ## Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -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..37fa3ba46b 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,31 @@ 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 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 +109,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..cf3942dd18 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..04510d57f5 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 @@ -30,6 +30,9 @@ class SendActivityNotificationPostRequestBody # The recipient property @recipient ## + # The teamsAppId property + @teams_app_id + ## # The templateParameters property @template_parameters ## @@ -51,15 +54,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 +84,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() @@ -106,6 +109,7 @@ def get_field_deserializers() "chainId" => lambda {|n| @chain_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) }, "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) }) }, } @@ -151,11 +155,27 @@ def serialize(writer) writer.write_object_value("chainId", @chain_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..f6c7762c75 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..bb02bdbdb5 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..5007fc6885 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..3542b0fd5a 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,31 @@ 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 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 +125,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/me/activities/item/history_items/history_items.rb b/lib/communications/call_records/item/organizer_v2/organizer_v2.rb similarity index 100% rename from lib/me/activities/item/history_items/history_items.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..4188619936 --- /dev/null +++ b/lib/communications/call_records/item/organizer_v2/organizer_v2_request_builder.rb @@ -0,0 +1,165 @@ +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 + 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/me/agreement_acceptances/count/count.rb b/lib/communications/call_records/item/participants_v2/count/count.rb similarity index 100% rename from lib/me/agreement_acceptances/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/me/activities/item/history_items/item/item.rb b/lib/communications/call_records/item/participants_v2/item/item.rb similarity index 100% rename from lib/me/activities/item/history_items/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..57c0860216 --- /dev/null +++ b/lib/communications/call_records/item/participants_v2/item/participant_item_request_builder.rb @@ -0,0 +1,168 @@ +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 + 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/me/activities/item/history_items/item/activity/activity.rb b/lib/communications/call_records/item/participants_v2/participants_v2.rb similarity index 100% rename from lib/me/activities/item/history_items/item/activity/activity.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..ba3bfd321b 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..082b9abd12 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..6135c6ebe7 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..19cee0e613 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..477f46d29b 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,13 @@ 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 return request_info end ## @@ -198,15 +201,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 +221,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..7e43b92845 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..0128b54f21 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..6060a29e1b 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..0e08460fd2 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..7a359a4255 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,13 @@ 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 return request_info end ## @@ -112,15 +109,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 +129,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..8bae902a7b 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..831928155a 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b1a0c9c777 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..9746c303c8 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..84aaf968e0 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..2d55437d26 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,31 @@ 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 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 +117,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..886ceea11d 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,32 @@ 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 + 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') return request_info end ## @@ -79,16 +107,25 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c54ff7120d 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,13 @@ 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 return request_info end ## @@ -108,15 +129,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 +149,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/me/app_role_assignments/count/count.rb b/lib/communications/online_meetings/item/recordings/count/count.rb similarity index 100% rename from lib/me/app_role_assignments/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..d96fa5d64b --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/item/call_recording_item_request_builder.rb @@ -0,0 +1,174 @@ +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 + 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/me/activities/item/item.rb b/lib/communications/online_meetings/item/recordings/item/content/content.rb similarity index 100% rename from lib/me/activities/item/item.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..57909b987a --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/item/content/content_request_builder.rb @@ -0,0 +1,142 @@ +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 + 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') + 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/me/agreement_acceptances/item/item.rb b/lib/communications/online_meetings/item/recordings/item/item.rb similarity index 100% rename from lib/me/agreement_acceptances/item/item.rb rename to lib/communications/online_meetings/item/recordings/item/item.rb diff --git a/lib/me/agreement_acceptances/agreement_acceptances.rb b/lib/communications/online_meetings/item/recordings/recordings.rb similarity index 100% rename from lib/me/agreement_acceptances/agreement_acceptances.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..fffce81791 --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_request_builder.rb @@ -0,0 +1,75 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..d7d204adea --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_request_builder.rb @@ -0,0 +1,75 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/me/authentication/email_methods/count/count.rb b/lib/communications/online_meetings/item/transcripts/count/count.rb similarity index 100% rename from lib/me/authentication/email_methods/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..8ce00df128 --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.rb @@ -0,0 +1,180 @@ +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 + 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/me/app_role_assignments/app_role_assignments.rb b/lib/communications/online_meetings/item/transcripts/item/content/content.rb similarity index 100% rename from lib/me/app_role_assignments/app_role_assignments.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..99d0ff25df --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/content/content_request_builder.rb @@ -0,0 +1,142 @@ +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 + 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') + 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/me/app_role_assignments/item/item.rb b/lib/communications/online_meetings/item/transcripts/item/item.rb similarity index 100% rename from lib/me/app_role_assignments/item/item.rb rename to lib/communications/online_meetings/item/transcripts/item/item.rb diff --git a/lib/me/authentication/authentication.rb b/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content.rb similarity index 100% rename from lib/me/authentication/authentication.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..a1c277fc4d --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_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 '../../../../../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 + 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') + 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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/me/authentication/email_methods/email_methods.rb b/lib/communications/online_meetings/item/transcripts/transcripts.rb similarity index 100% rename from lib/me/authentication/email_methods/email_methods.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..7ecc2a5c30 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..341422b865 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e44e468473 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,13 @@ 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 return request_info end ## @@ -114,15 +117,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 +137,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..ed178904ac 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..94ee86452b --- /dev/null +++ b/lib/communications/presences/item/set_status_message/set_status_message_request_builder.rb @@ -0,0 +1,75 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b35d3ae501 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..5f38506480 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,13 @@ 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 return request_info end ## @@ -112,15 +109,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 +129,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..b1f518ae3f 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,45 @@ 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 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 +115,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..388c51df45 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,41 @@ 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 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 +113,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..b8b81d3c47 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..a5f6203a64 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,41 @@ 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 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 +121,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..5e431c8e18 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,31 @@ 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 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 +109,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..5575e9f2a1 100644 --- a/lib/contacts/contacts_request_builder.rb +++ b/lib/contacts/contacts_request_builder.rb @@ -60,7 +60,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,%24skip,%24top}") end ## ## Get the list of organizational contacts for 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::OrgContactCollectionResponse.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::OrgContact.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 contacts_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContactsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the list of organizational contacts for this organization. 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..6ee7c4e418 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 have been registered in a directory, including through multi-tenant 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 have been registered in a directory, including through multi-tenant 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..70b5ed1157 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,7 +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}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}") end ## ## Delete entity from contacts @@ -85,8 +97,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 ## @@ -99,8 +110,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + 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 ## @@ -115,8 +125,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::OrgContact.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -126,13 +135,13 @@ 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 return request_info end ## @@ -142,15 +151,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 ## @@ -162,17 +171,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 org_contact_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OrgContactItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the properties and relationships of an organizational contact. diff --git a/lib/contacts/item/restore/restore_request_builder.rb b/lib/contacts/item/restore/restore_request_builder.rb index 2deb3d20b9..12c3ee0c70 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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 ## @@ -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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/authentication/email_methods/item/item.rb b/lib/contacts/item/retry_service_provisioning/retry_service_provisioning.rb similarity index 100% rename from lib/me/authentication/email_methods/item/item.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..1381c7442d --- /dev/null +++ b/lib/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.rb @@ -0,0 +1,67 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/me/authentication/fido2_methods/count/count.rb b/lib/contacts/item/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/me/authentication/fido2_methods/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/me/authentication/fido2_methods/fido2_methods.rb b/lib/contacts/item/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/me/authentication/fido2_methods/fido2_methods.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..efea5bcc80 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..bae6de8ddc 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 have been registered in a directory, including through multi-tenant 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 have been registered in a directory, including through multi-tenant 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..4364666cff 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,13 @@ 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 return request_info end ## @@ -118,15 +115,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 +135,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..430bb8d1bb 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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 ## @@ -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. If an item was accidentally deleted, you can fully restore the item. However, security groups can't be restored. Also, restoring an application doesn't restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains 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 + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..cbb6c54da3 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..0177b96d01 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..b0aa83c158 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,13 @@ 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 return request_info end ## @@ -108,15 +105,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 +125,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..8b5ad3ceeb 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..75d6d9cd35 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..5abe55d367 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..ae00bbd5db 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..dd503ec4bd 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..b83aedf19b 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..ed0771f5ed 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..d28322b13c 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,45 @@ 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 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 +111,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..53330e9455 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..47265b12dd 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,13 @@ 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 return request_info end ## @@ -108,15 +105,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 +125,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..1b98c17ac9 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 managedAppProtection 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,31 @@ 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 return request_info end ## - ## Read properties and relationships of the managedAppPolicy object. + ## Read properties and relationships of the managedAppProtection 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 +113,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 managedAppProtection 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..5ba631f00d 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..9b6e8bbeb4 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 targetedManagedAppProtection 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 targetedManagedAppProtection 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 targetedManagedAppProtection 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..cfdd2d279d 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..72ff483b92 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..7554e13302 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..39a39f38a8 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..8268c388e1 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 iosManagedAppRegistration 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,31 @@ 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 return request_info end ## - ## Read properties and relationships of the managedAppRegistration object. + ## Read properties and relationships of the iosManagedAppRegistration 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 +125,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 iosManagedAppRegistration 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..78d5076441 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..8f1e24c5a6 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 iosManagedAppRegistration 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 iosManagedAppRegistration 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 iosManagedAppRegistration 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..703677bbac 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,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::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,13 +71,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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_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. 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..22c771d385 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,10 +38,10 @@ 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. + ## List properties and relationships of the managedAppStatus objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_status_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::ManagedAppStatusCollectionResponse.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::ManagedAppStatus.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the managedAppStatusRaw objects. + ## List properties and relationships of the managedAppStatus 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_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. + # List properties and relationships of the managedAppStatus objects. class ManagedAppStatusesRequestBuilderGetQueryParameters ## 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..39613731b1 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..524a554294 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,7 +25,7 @@ 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. @@ -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,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::ManagedEBookAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a managedEBookAssignment object. + ## Update the properties of a iosVppEBookAssignment 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 managed_e_book_assignment @@ -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::ManagedEBookAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,35 +75,35 @@ 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 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 ## - ## Update the properties of a managedEBookAssignment object. + ## Update the properties of a iosVppEBookAssignment 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 +111,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..6a351abe2d 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..bc743426f3 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..b17bd674fe 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,31 @@ 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 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 +137,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..74da1cf0e1 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..73d2e81fc5 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..6841bd5663 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..4357e18ba2 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..5ed4c63e7b 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,13 @@ 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 return request_info end ## @@ -108,15 +105,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 +125,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..4e4b17eb8f 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..4782a5a8e0 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..72e5131c14 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..06f7f5cac5 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..6250bd04e1 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..09e345a060 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..e11eb2c397 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,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 ## - ## Read properties and relationships of the iosMobileAppConfiguration object. + ## Read properties and relationships of the managedDeviceMobileAppConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_device_mobile_app_configuration ## @@ -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,31 +107,31 @@ 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 return request_info end ## - ## Read properties and relationships of the iosMobileAppConfiguration object. + ## Read properties and relationships of the managedDeviceMobileAppConfiguration 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 ## @@ -146,20 +143,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_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. + # Read properties and relationships of the managedDeviceMobileAppConfiguration object. class ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters ## 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..6e2f268887 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..181e9bbcbc 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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/me/authentication/methods/count/count.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/count/count.rb similarity index 100% rename from lib/me/authentication/methods/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/me/authentication/fido2_methods/item/item.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app.rb similarity index 100% rename from lib/me/authentication/fido2_methods/item/item.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/me/authentication/microsoft_authenticator_methods/count/count.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/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/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/me/authentication/methods/item/item.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app.rb similarity index 100% rename from lib/me/authentication/methods/item/item.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/me/authentication/operations/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count.rb similarity index 100% rename from lib/me/authentication/operations/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/me/authentication/methods/methods.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app.rb similarity index 100% rename from lib/me/authentication/methods/methods.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/me/authentication/password_methods/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/count/count.rb similarity index 100% rename from lib/me/authentication/password_methods/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/me/authentication/microsoft_authenticator_methods/item/device/device.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app.rb similarity index 100% rename from lib/me/authentication/microsoft_authenticator_methods/item/device/device.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/me/authentication/phone_methods/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count.rb similarity index 100% rename from lib/me/authentication/phone_methods/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/me/authentication/microsoft_authenticator_methods/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/me/authentication/microsoft_authenticator_methods/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/me/authentication/software_oath_methods/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/me/authentication/software_oath_methods/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/me/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods.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/me/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods.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/me/authentication/temporary_access_pass_methods/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/me/authentication/temporary_access_pass_methods/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/me/authentication/operations/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/me/authentication/operations/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/me/authentication/windows_hello_for_business_methods/count/count.rb b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/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/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/me/authentication/operations/operations.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/me/authentication/operations/operations.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/me/calendar/calendar_permissions/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/me/calendar/calendar_permissions/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/me/authentication/password_methods/item/item.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/me/authentication/password_methods/item/item.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/me/calendar/calendar_view/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/me/calendar/calendar_view/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/me/authentication/password_methods/password_methods.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/me/authentication/password_methods/password_methods.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/me/calendar/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/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/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/me/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app.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/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/calendar/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/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/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/me/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x.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/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/calendar/calendar_view/item/instances/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/calendar/calendar_view/item/instances/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/me/authentication/phone_methods/item/item.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/me/authentication/phone_methods/item/item.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/calendar/calendar_view/item/instances/item/attachments/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/calendar/calendar_view/item/instances/item/attachments/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/me/authentication/phone_methods/phone_methods.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/me/authentication/phone_methods/phone_methods.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/calendar/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/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/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/me/authentication/software_oath_methods/item/item.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app.rb similarity index 100% rename from lib/me/authentication/software_oath_methods/item/item.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..da4d8eaeae 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..96ab302ff3 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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/me/authentication/software_oath_methods/software_oath_methods.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments.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_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/calendar/events/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/calendar/events/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/me/authentication/temporary_access_pass_methods/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/me/authentication/temporary_access_pass_methods/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..2dcc05d7b9 --- /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,171 @@ +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 + 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/temporary_access_pass_methods/temporary_access_pass_methods.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories.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_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/calendar/events/item/attachments/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/calendar/events/item/attachments/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/me/authentication/windows_hello_for_business_methods/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/me/authentication/windows_hello_for_business_methods/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/me/authentication/windows_hello_for_business_methods/item/device/device.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions.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_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/calendar/events/item/extensions/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/calendar/events/item/extensions/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/me/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods.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/me/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods.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/calendar/events/item/instances/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/calendar/events/item/instances/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/me/calendar/calendar_permissions/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/me/calendar/calendar_permissions/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..856c4a66b8 --- /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,177 @@ +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 + 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/item/attachments/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/calendar/events/item/instances/item/attachments/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/me/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/me/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..30eded3446 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/attachments/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/me/calendar/calendar_view/item/attachments/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..9918a5ffdc --- /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,189 @@ +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 + 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_permissions/calendar_permissions.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/me/calendar/calendar_permissions/calendar_permissions.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..0a4a007381 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/extensions/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/me/calendar/calendar_view/item/extensions/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..2d09e5a263 --- /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,183 @@ +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 + 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/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app.rb similarity index 100% rename from lib/me/calendar/calendar_view/calendar_view.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/me/calendar/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments.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_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/calendar/events/item/instances/item/extensions/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/calendar/events/item/instances/item/extensions/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/me/calendar/calendar_view/item/instances/item/attachments/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/me/calendar/calendar_view/item/instances/item/attachments/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..37d26fa471 --- /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,171 @@ +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 + 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/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories.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_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/calendar_groups/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/calendar_groups/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/calendar/calendar_view/item/instances/item/extensions/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/calendar/calendar_view/item/instances/item/extensions/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/me/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_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_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/me/calendar/calendar_view/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_ios_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_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/calendar_groups/item/calendars/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/calendar_groups/item/calendars/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/calendar/calendar_view/item/instances/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/calendar/calendar_view/item/instances/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..1143130c96 --- /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,171 @@ +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 + 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_ios_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_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/calendar_groups/item/calendars/item/calendar_permissions/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/calendar_groups/item/calendars/item/calendar_permissions/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/calendar/calendar_view/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/calendar/calendar_view/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/calendar/calendar_view/item/instances/item/attachments/attachments.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/calendar/calendar_view/item/instances/item/attachments/attachments.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/calendar_groups/item/calendars/item/calendar_view/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/calendar_groups/item/calendars/item/calendar_view/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/calendar/calendar_view/item/instances/item/calendar/calendar.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/calendar/calendar_view/item/instances/item/calendar/calendar.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_groups/item/calendars/item/calendar_view/item/attachments/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_groups/item/calendars/item/calendar_view/item/attachments/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/calendar/events/item/attachments/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/calendar/events/item/attachments/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..9aae7b7bab --- /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,177 @@ +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 + 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/extensions/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_groups/item/calendars/item/calendar_view/item/extensions/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/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.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/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.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..c2d797de38 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/extensions/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/calendar/events/item/extensions/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..4186a99471 --- /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,189 @@ +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 + 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_ios_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_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..762e9b382b --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/attachments/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/calendar/events/item/instances/item/attachments/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..2a11b1e3c8 --- /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,183 @@ +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 + 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_ios_lob_app/graph_ios_lob_app.rb similarity index 100% rename from lib/me/calendar/events/events.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/calendar/events/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_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_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_groups/item/calendars/item/calendar_view/item/instances/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_groups/item/calendars/item/calendar_view/item/instances/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/calendar/events/item/instances/item/extensions/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/calendar/events/item/instances/item/extensions/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..dcf99ccb4f --- /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,171 @@ +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 + 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_ios_store_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_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_groups/item/calendars/item/calendar_view/item/instances/item/attachments/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_groups/item/calendars/item/calendar_view/item/instances/item/attachments/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/calendar/events/item/instances/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/calendar/events/item/instances/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/calendar/events/item/dismiss_reminder/dismiss_reminder.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/calendar/events/item/dismiss_reminder/dismiss_reminder.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/calendar/events/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar/events/item/extensions/extensions.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_groups/item/calendars/item/calendar_view/item/instances/item/extensions/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_groups/item/calendars/item/calendar_view/item/instances/item/extensions/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/calendar/events/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/calendar/events/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..18e64551f6 --- /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,171 @@ +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 + 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/instances.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories.rb similarity index 100% rename from lib/me/calendar/events/item/instances/instances.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_groups/item/calendars/item/events/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_groups/item/calendars/item/events/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/calendar_groups/item/calendars/item/calendar_permissions/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/calendar_groups/item/calendars/item/calendar_permissions/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/calendar/events/item/instances/item/attachments/attachments.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/calendar/events/item/instances/item/attachments/attachments.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/calendar/events/item/instances/item/calendar/calendar.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/calendar/events/item/instances/item/calendar/calendar.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_groups/item/calendars/item/events/item/attachments/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_groups/item/calendars/item/events/item/attachments/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/calendar_groups/item/calendars/item/calendar_view/item/attachments/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/calendar_groups/item/calendars/item/calendar_view/item/attachments/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..3ed22180fb --- /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,171 @@ +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 + 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/dismiss_reminder/dismiss_reminder.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/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder.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_groups/item/calendars/item/events/item/extensions/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_groups/item/calendars/item/events/item/extensions/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/calendar_groups/item/calendars/item/calendar_view/item/extensions/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/calendar_groups/item/calendars/item/calendar_view/item/extensions/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/calendar/events/item/instances/item/extensions/extensions.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/calendar/events/item/instances/item/extensions/extensions.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_groups/item/calendars/item/events/item/instances/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_groups/item/calendars/item/events/item/instances/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/calendar_groups/calendar_groups.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/calendar_groups/calendar_groups.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_groups/item/calendars/item/events/item/instances/item/attachments/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_groups/item/calendars/item/events/item/instances/item/attachments/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/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/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/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/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..e43058b2c7 --- /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,177 @@ +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 + 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/item/extensions/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_groups/item/calendars/item/events/item/instances/item/extensions/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/calendar_groups/item/calendars/calendars.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/calendar_groups/item/calendars/calendars.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..7e85482f4e --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/instances/item/extensions/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/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/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..52cd51fce3 --- /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,189 @@ +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 + 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_permissions/calendar_permissions.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/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions.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..4e58f2e8c5 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/instances/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_groups/item/calendars/item/calendar_view/item/instances/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..9e6f651764 --- /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,183 @@ +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 + 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/calendar_view/calendar_view.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/calendar_groups/item/calendars/item/calendar_view/calendar_view.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/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments.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/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments.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_view/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_view/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_groups/item/calendars/item/calendar_view/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_groups/item/calendars/item/calendar_view/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..e863ccf97d --- /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,171 @@ +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 + 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_mac_o_s_lob_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_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_view/item/attachments/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_view/item/attachments/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_groups/item/calendars/item/events/item/attachments/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_groups/item/calendars/item/events/item/attachments/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_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.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_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.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_view/item/extensions/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_view/item/extensions/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_groups/item/calendars/item/calendar_view/item/extensions/extensions.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_groups/item/calendars/item/calendar_view/item/extensions/extensions.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_view/item/instances/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_view/item/instances/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_groups/item/calendars/item/events/item/extensions/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_groups/item/calendars/item/events/item/extensions/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..517c20121e --- /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,177 @@ +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 + 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/instances/item/attachments/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_view/item/instances/item/attachments/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_groups/item/calendars/item/calendar_view/item/instances/instances.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_groups/item/calendars/item/calendar_view/item/instances/instances.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..14b3c3c56c --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/events/item/instances/item/attachments/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_groups/item/calendars/item/events/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/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..3b96152349 --- /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,189 @@ +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 + 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/attachments/attachments.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_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments.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..f083d1437f --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/instances/item/extensions/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_groups/item/calendars/item/events/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/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..07eaf76760 --- /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,183 @@ +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 + 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/calendar_view/item/instances/item/calendar/calendar.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_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar.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_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.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_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.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_view/item/instances/item/extensions/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_view/item/instances/item/extensions/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_groups/item/calendars/item/events/item/instances/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_groups/item/calendars/item/events/item/instances/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..b417440615 --- /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,171 @@ +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 + 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/item/extensions/extensions.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_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions.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/calendars/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/calendars/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_groups/item/calendars/item/events/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_groups/item/calendars/item/events/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_groups/item/calendars/item/events/events.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_groups/item/calendars/item/events/events.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/calendars/item/calendar_permissions/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/calendars/item/calendar_permissions/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_groups/item/calendars/item/events/item/attachments/attachments.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_groups/item/calendars/item/events/item/attachments/attachments.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/calendars/item/calendar_view/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/calendars/item/calendar_view/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_groups/item/calendars/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_groups/item/calendars/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..8c3fb29f66 --- /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,177 @@ +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 + 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_managed_android_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_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_groups/item/calendars/item/events/item/calendar/calendar.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_groups/item/calendars/item/events/item/calendar/calendar.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..5ec2436423 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/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_groups/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..83eac16d3c --- /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,189 @@ +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 + 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/dismiss_reminder/dismiss_reminder.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_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder.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..07d9e04609 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/attachments/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_view/item/attachments/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..f77e3aa1c8 --- /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,183 @@ +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 + 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/extensions/extensions.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_groups/item/calendars/item/events/item/extensions/extensions.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_groups/item/calendars/item/events/item/instances/instances.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_groups/item/calendars/item/events/item/instances/instances.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/calendars/item/calendar_view/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/calendars/item/calendar_view/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_view/item/extensions/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_view/item/extensions/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..39216e9e10 --- /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,171 @@ +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 + 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/attachments/attachments.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_groups/item/calendars/item/events/item/instances/item/attachments/attachments.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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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_view/item/instances/item/attachments/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_view/item/instances/item/attachments/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_groups/item/calendars/item/events/item/instances/item/calendar/calendar.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_groups/item/calendars/item/events/item/instances/item/calendar/calendar.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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.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_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.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/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/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_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_view/item/instances/item/extensions/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_view/item/instances/item/extensions/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..952e7ce44f --- /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,177 @@ +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 + 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_managed_i_o_s_lob_app/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_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_groups/item/calendars/item/events/item/instances/item/extensions/extensions.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_groups/item/calendars/item/events/item/instances/item/extensions/extensions.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..dc5de40479 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/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_view/item/instances/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..4c2b521432 --- /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,189 @@ +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 + 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/calendar_view.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_view/calendar_view.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..62d10366da --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/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_view/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..e5c2b39743 --- /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,183 @@ +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 + 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/attachments/attachments.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_view/item/attachments/attachments.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_view/item/calendar/calendar.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_view/item/calendar/calendar.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/calendars/item/events/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/calendars/item/events/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/calendars/item/calendar_permissions/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/calendars/item/calendar_permissions/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..3a9be78eb6 --- /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,171 @@ +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 + 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/dismiss_reminder/dismiss_reminder.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_view/item/dismiss_reminder/dismiss_reminder.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/calendars/item/events/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/calendars/item/events/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/calendars/item/calendar_view/item/attachments/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/calendars/item/calendar_view/item/attachments/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_view/item/extensions/extensions.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_view/item/extensions/extensions.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/calendars/item/events/item/instances/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/calendars/item/events/item/instances/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_view/item/instances/instances.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_view/item/instances/instances.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/calendars/item/events/item/instances/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/calendars/item/events/item/instances/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/calendars/item/calendar_view/item/extensions/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/calendars/item/calendar_view/item/extensions/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..d128f10290 --- /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,177 @@ +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 + 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_managed_mobile_lob_app/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_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_view/item/instances/item/attachments/attachments.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_view/item/instances/item/attachments/attachments.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..245b46e188 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/instances/item/attachments/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/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/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..94c917451a --- /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,189 @@ +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 + 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/instances/item/calendar/calendar.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_view/item/instances/item/calendar/calendar.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..1314d7b707 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/extensions/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/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/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..14bbdfaade --- /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,183 @@ +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 + 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_view/item/instances/item/dismiss_reminder/dismiss_reminder.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_view/item/instances/item/dismiss_reminder/dismiss_reminder.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/chats/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/chats/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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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..80dfa01ceb --- /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,171 @@ +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 + 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/extensions/extensions.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_view/item/instances/item/extensions/extensions.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/chats/item/installed_apps/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/chats/item/installed_apps/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/calendars/item/calendar_view/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/calendars/item/calendar_view/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/calendars/calendars.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/calendars/calendars.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/calendars/item/calendar_permissions/calendar_permissions.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments.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_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/chats/item/members/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/chats/item/members/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/calendars/item/events/item/attachments/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/calendars/item/events/item/attachments/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..94e69109c3 --- /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,171 @@ +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 + 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/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories.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_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/chats/item/messages/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/chats/item/messages/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/calendars/item/events/item/extensions/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/calendars/item/events/item/extensions/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/calendars/item/calendar_view/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/calendars/item/calendar_view/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/chats/item/messages/item/hosted_contents/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/chats/item/messages/item/hosted_contents/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/calendars/item/calendar_view/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/calendars/item/calendar_view/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/chats/item/messages/item/replies/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/chats/item/messages/item/replies/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/calendars/item/events/item/instances/item/attachments/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/calendars/item/events/item/instances/item/attachments/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..d199fb9ed0 --- /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,177 @@ +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 + 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/item/hosted_contents/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/chats/item/messages/item/replies/item/hosted_contents/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/calendars/item/calendar_view/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/calendars/item/calendar_view/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..0e06c3c687 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/instances/item/extensions/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/calendars/item/events/item/instances/item/extensions/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..438f957803 --- /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,189 @@ +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 + 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_view/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/calendars/item/calendar_view/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..42b53cb46f --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/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/calendars/item/events/item/instances/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..dfb6ecff34 --- /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,183 @@ +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 + 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/item/instances/instances.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/calendars/item/calendar_view/item/instances/instances.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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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/chats/item/permission_grants/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/chats/item/permission_grants/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/calendars/item/events/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/calendars/item/events/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..700f9300a5 --- /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,171 @@ +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 + 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/instances/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/calendars/item/calendar_view/item/instances/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/chats/item/pinned_messages/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/chats/item/pinned_messages/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/calendars/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/calendars/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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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/chats/item/tabs/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/chats/item/tabs/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/calendars/item/calendar_view/item/instances/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/calendars/item/calendar_view/item/instances/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/contact_folders/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/contact_folders/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/chats/item/installed_apps/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/chats/item/installed_apps/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..620a6f44ef --- /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,177 @@ +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 + 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/contact_folders/item/child_folders/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/contact_folders/item/child_folders/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/calendars/item/events/events.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/calendars/item/events/events.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..7d157f4b01 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/chats/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/chats/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..1e68edcc3d --- /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,189 @@ +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 + 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/events/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/calendars/item/events/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..1386e1a989 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/chats/item/members/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/chats/item/members/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..91da29cbf8 --- /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,183 @@ +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 + 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/events/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/calendars/item/events/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/calendars/item/events/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/calendars/item/events/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/contact_folders/item/child_folders/item/contacts/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/contact_folders/item/child_folders/item/contacts/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/chats/item/messages/item/hosted_contents/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/chats/item/messages/item/hosted_contents/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..0b896d3a8e --- /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,171 @@ +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 + 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/events/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/calendars/item/events/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/contact_folders/item/child_folders/item/contacts/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/contact_folders/item/child_folders/item/contacts/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/chats/item/messages/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/chats/item/messages/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/calendars/item/events/item/instances/instances.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/calendars/item/events/item/instances/instances.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/contact_folders/item/contacts/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/contact_folders/item/contacts/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/calendars/item/events/item/instances/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/calendars/item/events/item/instances/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/contact_folders/item/contacts/item/extensions/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/contact_folders/item/contacts/item/extensions/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/chats/item/messages/item/replies/item/hosted_contents/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/chats/item/messages/item/replies/item/hosted_contents/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..c9fe7d0e32 --- /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,177 @@ +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 + 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/contacts/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/contacts/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/calendars/item/events/item/instances/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/calendars/item/events/item/instances/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..9d6a1d0b72 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/chats/item/messages/item/replies/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/chats/item/messages/item/replies/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..44b4409d47 --- /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,189 @@ +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 + 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/events/item/instances/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/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/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..6ee96dd86f --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/chats/item/permission_grants/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/chats/item/permission_grants/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..4132b04ac9 --- /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,183 @@ +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 + 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/events/item/instances/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/calendars/item/events/item/instances/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/chats/chats.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments.rb similarity index 100% rename from lib/me/chats/chats.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/contacts/item/extensions/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/contacts/item/extensions/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/chats/item/pinned_messages/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/chats/item/pinned_messages/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..13b17fcf31 --- /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,171 @@ +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 + 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/chats/item/installed_apps/installed_apps.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories.rb similarity index 100% rename from lib/me/chats/item/installed_apps/installed_apps.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/created_objects/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/created_objects/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/chats/item/tabs/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/chats/item/tabs/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/chats/item/installed_apps/item/teams_app/teams_app.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/chats/item/installed_apps/item/teams_app/teams_app.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/created_objects/graph_service_principal/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/created_objects/graph_service_principal/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/contact_folders/item/child_folders/item/contacts/item/extensions/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/contact_folders/item/child_folders/item/contacts/item/extensions/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..55ca2bd005 --- /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,171 @@ +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 + 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/chats/item/installed_apps/item/teams_app_definition/teams_app_definition.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/chats/item/installed_apps/item/teams_app_definition/teams_app_definition.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/device_management_troubleshooting_events/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/device_management_troubleshooting_events/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/chats/item/last_message_preview/last_message_preview.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/chats/item/last_message_preview/last_message_preview.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/direct_reports/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/direct_reports/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/contact_folders/item/child_folders/item/contacts/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/contact_folders/item/child_folders/item/contacts/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..3e37005489 --- /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,177 @@ +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 + 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/direct_reports/graph_org_contact/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/direct_reports/graph_org_contact/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/chats/item/members/members.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/chats/item/members/members.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..04e14a1809 --- /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,90 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/contact_folders/item/child_folders/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/contact_folders/item/child_folders/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..9f8bef3d73 --- /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,189 @@ +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 + 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/chats/item/messages/item/hosted_contents/hosted_contents.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/chats/item/messages/item/hosted_contents/hosted_contents.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..c354d629c6 --- /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,85 @@ +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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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/contact_folders/item/contacts/item/extensions/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/contact_folders/item/contacts/item/extensions/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..db7a087198 --- /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,183 @@ +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 + 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/chats/item/messages/item/hosted_contents/item/value/value.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/chats/item/messages/item/hosted_contents/item/value/value.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/chats/item/messages/item/replies/item/hosted_contents/hosted_contents.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/hosted_contents.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/direct_reports/graph_user/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/direct_reports/graph_user/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/contact_folders/item/contacts/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/contact_folders/item/contacts/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..63721389e1 --- /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,171 @@ +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 + 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/chats/item/messages/item/replies/item/hosted_contents/item/value/value.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/item/value/value.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/drives/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/drives/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/contact_folders/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/contact_folders/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/chats/item/messages/item/replies/item/soft_delete/soft_delete.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/chats/item/messages/item/replies/item/soft_delete/soft_delete.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..456e87f63b 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 managedIOSLobApp. ## @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 macOSMicrosoftEdgeApp 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 iosiPadOSWebClip 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,45 @@ 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 managedIOSLobApp. ## @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 return request_info end ## - ## Read properties and relationships of the windowsMicrosoftEdgeApp object. + ## Read properties and relationships of the macOSMicrosoftEdgeApp 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 iosiPadOSWebClip 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 +221,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 macOSMicrosoftEdgeApp 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..4d1706c4e2 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 windowsMobileMSI 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 macOSMicrosoftEdgeApp 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 windowsMobileMSI 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 macOSMicrosoftEdgeApp 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 windowsMobileMSI 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..f95507ea1d 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e1dca560df 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..5554b92cb1 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..8bc634d5b7 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..15968334e1 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..4466444d8d 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..901e308d85 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,13 @@ 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 return request_info end ## @@ -120,15 +117,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 +137,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..1dc6880b27 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..efc5b66fa4 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..16cdaf3098 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,45 @@ 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 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 +111,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..5bc9a189f5 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..0909b96584 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,13 @@ 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 return request_info end ## @@ -108,15 +105,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 +125,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..f3497715f2 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..eb8e72e044 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..757e641edd 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..ec71e2ae47 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..cfbf24cadd 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..3c79d4b519 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..c032790ec1 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 windowsPhone81CompliancePolicy 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 windows10CompliancePolicy 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 windowsPhone81CompliancePolicy 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 windows10CompliancePolicy 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 windowsPhone81CompliancePolicy 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..896abcf8f0 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..faa4a61286 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,10 +75,10 @@ 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. + ## Deletes a iosCompliancePolicy. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -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 windowsPhone81CompliancePolicy 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 macOSCompliancePolicy 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,46 +115,45 @@ 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 ## - ## Deletes a androidWorkProfileCompliancePolicy. + ## Deletes a iosCompliancePolicy. ## @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 return request_info end ## - ## Read properties and relationships of the iosCompliancePolicy object. + ## Read properties and relationships of the windowsPhone81CompliancePolicy 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 macOSCompliancePolicy 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 +161,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 windowsPhone81CompliancePolicy 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..94097db6cf 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..3f420e3940 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..b282a8b630 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..5b640e17fa 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..1ae951f830 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..f115573825 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,13 @@ 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 return request_info end ## @@ -98,15 +95,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 +115,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..7d17b82cc8 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..050a7b820e 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..14b067280f 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..0729c67eb9 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..c1b3a5e6ea 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..fb90b92613 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,13 @@ 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 return request_info end ## @@ -88,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 ## @@ -108,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 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..ef2a561de4 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 windows10EnterpriseModernAppManagementConfiguration 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,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::DeviceConfigurationCollectionResponse.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::DeviceConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the windows10SecureAssessmentConfiguration objects. + ## List properties and relationships of the windows10EnterpriseModernAppManagementConfiguration 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_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 windows10EnterpriseModernAppManagementConfiguration 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..441105162d 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..decb6269e3 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 windows10TeamGeneralConfiguration. ## @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 iosCustomConfiguration 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 windowsDefenderAdvancedThreatProtectionConfiguration 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,45 @@ 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 windows10TeamGeneralConfiguration. ## @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 return request_info end ## - ## Read properties and relationships of the iosGeneralDeviceConfiguration object. + ## Read properties and relationships of the iosCustomConfiguration 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 windowsDefenderAdvancedThreatProtectionConfiguration 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 +159,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 iosCustomConfiguration 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..e3fc89e874 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..a449d9f4a0 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..fa20044995 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..c73c91af44 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..c792ce4f9e 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..c10f9513e7 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,7 +38,7 @@ 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. @@ -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,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::DeviceEnrollmentConfiguration.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_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. 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..7642a431f5 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..4e98d1412b 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..3a851bd3c3 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,10 +39,10 @@ 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. + ## Deletes a deviceEnrollmentPlatformRestrictionsConfiguration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -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,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 deviceEnrollmentLimitConfiguration 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,24 +79,23 @@ 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 ## - ## Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. + ## Deletes a deviceEnrollmentPlatformRestrictionsConfiguration. ## @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 return request_info end ## @@ -108,19 +105,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 deviceEnrollmentPlatformRestrictionsConfiguration object. + ## Update the properties of a deviceEnrollmentLimitConfiguration 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,17 +125,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_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. 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..15633b5b3c 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..5111aa3b16 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..b354ce655d 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..a5a1b28e78 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..de62393270 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..0b765f3cd5 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..c2cf2c1f42 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..7bde27e53b 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..7ea6c9a723 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..a0734a5c5f 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..78097d318f 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,35 @@ 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 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 +115,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/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete.rb b/lib/device_management/managed_devices/item/device_category/ref/ref.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete.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..a58664ccd7 --- /dev/null +++ b/lib/device_management/managed_devices/item/device_category/ref/ref_request_builder.rb @@ -0,0 +1,138 @@ +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 + 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 + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..58a758bd01 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..c88a707ac2 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..b3623c1458 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..221a577ad2 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..faf6dc1d56 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..2db7bfacbd 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..00e785165c 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,35 @@ 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 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 +251,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..6aae94f431 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..f8f84f793e 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..4ceca2787d 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..cd9ef9f71b 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c90c23e4d9 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..6231d9bef6 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..5f3f35776d 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..913e7e84fa 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..263040d0a8 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..7a9f2c26ed 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..c5d765f288 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..365627b87a 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,45 @@ 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 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 +113,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..6be15fa1fe 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,35 @@ 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 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 +115,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..af377e3e48 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,25 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..d4a8922253 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..2e249bf2e9 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..196a1eb222 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..61429d9a6e 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..a61a075f9f 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..14288354a8 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..566c877f5b 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..24179761ba 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,24 @@ 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 return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..96918024f5 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..51fd8012f8 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,13 @@ 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 return request_info end ## @@ -92,15 +89,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 +109,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..09bbd67dc6 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..1346efcf6a 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e47dbd3817 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..119422a8c0 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..3058641586 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e3cef02c03 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..38b6ff23e0 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..a8b950e61c 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b6271a3993 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..90dae1bca6 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b90ecd14ad 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..995c435f98 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..e00b30cb29 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..98092d28f0 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..257ca9100b 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..21658fae86 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..f507ca8d14 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..d266778015 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') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..b976ff3c7f 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,13 @@ 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 return request_info end ## @@ -202,15 +205,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 +225,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..6156c5fd1a --- /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') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this 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..5ddaa66ec8 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..4aec3cafd3 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,13 @@ 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 return request_info end ## @@ -96,15 +93,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 +113,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..de566251aa 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..80027a6068 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,7 +27,7 @@ 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. @@ -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,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::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a roleDefinition object. + ## Update the properties of a 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 @@ -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::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,13 @@ 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 return request_info end ## @@ -96,19 +93,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 roleDefinition object. + ## Update the properties of a 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 @@ -116,17 +113,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..b9cc1938ce 100644 --- a/lib/device_management/role_definitions/role_definitions_request_builder.rb +++ b/lib/device_management/role_definitions/role_definitions_request_builder.rb @@ -38,7 +38,7 @@ 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. @@ -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,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::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,19 +75,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 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,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_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. 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..73f540982e 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..33559c12a6 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,13 @@ 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 return request_info end ## @@ -100,15 +97,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 +117,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..0783346daa 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,13 @@ 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 return request_info end ## @@ -94,15 +91,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 +111,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..ce40182d56 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,13 @@ 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 return request_info end ## @@ -102,15 +99,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 +119,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..791d68a724 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..6ae6354539 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..59f45ce92f 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..a1942159a5 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..5b164d4f9d 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..653fb303f7 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..58ac3616a9 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..155d7eddd4 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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..0575866189 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,13 @@ 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 return request_info end ## @@ -90,15 +87,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 +107,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_t