Class: MicrosoftGraph::Organization::Item::Branding::BrandingRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Organization::Item::Branding::BrandingRequestBuilder
- Defined in:
- lib/organization/item/branding/branding_request_builder.rb
Overview
Provides operations to manage the branding property of the microsoft.graph.organization entity.
Defined Under Namespace
Classes: BrandingRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#background_image ⇒ Object
Provides operations to manage the media for the organization entity.
-
#banner_logo ⇒ Object
Provides operations to manage the media for the organization entity.
-
#custom_c_s_s ⇒ Object
Provides operations to manage the media for the organization entity.
-
#delete(request_configuration = nil) ⇒ Object
Delete the default organizational branding object.
-
#favicon ⇒ Object
Provides operations to manage the media for the organization entity.
-
#get(request_configuration = nil) ⇒ Object
Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default.
-
#header_logo ⇒ Object
Provides operations to manage the media for the organization entity.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new BrandingRequestBuilder and sets the default values.
-
#localizations ⇒ Object
Provides operations to manage the localizations property of the microsoft.graph.organizationalBranding entity.
-
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of the default branding object specified by the organizationalBranding resource.
-
#square_logo ⇒ Object
Provides operations to manage the media for the organization entity.
-
#square_logo_dark ⇒ Object
Provides operations to manage the media for the organization entity.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete the default organizational branding object.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default.
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of the default branding object specified by the organizationalBranding resource.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new BrandingRequestBuilder and sets the default values.
71 72 73 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 71 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/organization/{organization%2Did}/branding{?%24select,%24expand}") end |
Instance Method Details
#background_image ⇒ Object
Provides operations to manage the media for the organization entity.
27 28 29 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 27 def background_image() return MicrosoftGraph::Organization::Item::Branding::BackgroundImage::BackgroundImageRequestBuilder.new(@path_parameters, @request_adapter) end |
#banner_logo ⇒ Object
Provides operations to manage the media for the organization entity.
32 33 34 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 32 def () return MicrosoftGraph::Organization::Item::Branding::BannerLogo::BannerLogoRequestBuilder.new(@path_parameters, @request_adapter) end |
#custom_c_s_s ⇒ Object
Provides operations to manage the media for the organization entity.
37 38 39 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 37 def custom_c_s_s() return MicrosoftGraph::Organization::Item::Branding::CustomCSS::CustomCSSRequestBuilder.new(@path_parameters, @request_adapter) end |
#delete(request_configuration = nil) ⇒ Object
Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object.
79 80 81 82 83 84 85 86 87 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 79 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 |
#favicon ⇒ Object
Provides operations to manage the media for the organization entity.
42 43 44 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 42 def favicon() return MicrosoftGraph::Organization::Item::Branding::Favicon::FaviconRequestBuilder.new(@path_parameters, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method.
93 94 95 96 97 98 99 100 101 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 93 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::OrganizationalBranding.create_from_discriminator_value(pn) }, error_mapping) end |
#header_logo ⇒ Object
Provides operations to manage the media for the organization entity.
47 48 49 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 47 def header_logo() return MicrosoftGraph::Organization::Item::Branding::HeaderLogo::HeaderLogoRequestBuilder.new(@path_parameters, @request_adapter) end |
#localizations ⇒ Object
Provides operations to manage the localizations property of the microsoft.graph.organizationalBranding entity.
52 53 54 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 52 def localizations() return MicrosoftGraph::Organization::Item::Branding::Localizations::LocalizationsRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of the default branding object specified by the organizationalBranding resource.
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 108 def patch(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = self.to_patch_request_information( body, request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrganizationalBranding.create_from_discriminator_value(pn) }, error_mapping) end |
#square_logo ⇒ Object
Provides operations to manage the media for the organization entity.
57 58 59 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 57 def square_logo() return MicrosoftGraph::Organization::Item::Branding::SquareLogo::SquareLogoRequestBuilder.new(@path_parameters, @request_adapter) end |
#square_logo_dark ⇒ Object
Provides operations to manage the media for the organization entity.
62 63 64 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 62 def square_logo_dark() return MicrosoftGraph::Organization::Item::Branding::SquareLogoDark::SquareLogoDarkRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete the default organizational branding object. To delete the organizationalBranding object, all images (Stream types) must first be removed from the object.
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 123 def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.(request_configuration.) end return request_info end |
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method.
139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 139 def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :GET request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.(request_configuration.) end return request_info end |
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of the default branding object specified by the organizationalBranding resource.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/organization/item/branding/branding_request_builder.rb', line 158 def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :PATCH request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.(request_configuration.) end request_info.set_content_from_parsable(@request_adapter, "application/json", body) return request_info end |