Class: MicrosoftGraph::Organization::Item::Branding::BrandingRequestBuilder

Inherits:
MicrosoftKiotaAbstractions::BaseRequestBuilder
  • Object
show all
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

Constructor Details

#initialize(path_parameters, request_adapter) ⇒ Object

Instantiates a new BrandingRequestBuilder and sets the default values.

Parameters:

  • path_parameters

    Path parameters for the request

  • request_adapter

    The request adapter to use to execute the requests.



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_imageObject

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

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_sObject

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.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of void



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

#faviconObject

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.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of organizational_branding



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_logoObject

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 ()
    return MicrosoftGraph::Organization::Item::Branding::HeaderLogo::HeaderLogoRequestBuilder.new(@path_parameters, @request_adapter)
end

#localizationsObject

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.

Parameters:

  • body

    The request body

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of organizational_branding

Raises:

  • (StandardError)


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_logoObject

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 ()
    return MicrosoftGraph::Organization::Item::Branding::SquareLogo::SquareLogoRequestBuilder.new(@path_parameters, @request_adapter)
end

#square_logo_darkObject

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.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information



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.add_request_options(request_configuration.options)
    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.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information



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.add_request_options(request_configuration.options)
    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.

Parameters:

  • body

    The request body

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information

Raises:

  • (StandardError)


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.add_request_options(request_configuration.options)
    end
    request_info.set_content_from_parsable(@request_adapter, "application/json", body)
    return request_info
end