Modulemd.ServiceLevel: Modulemd Reference Manual

## Modulemd.ServiceLevel Modulemd.ServiceLevel — Provides lifecycle information for a module stream. |

## Stability Level

Stable, unless otherwise indicated

## Functions

ModulemdServiceLevel * | modulemd_service_level_new ()
ModulemdServiceLevel * | modulemd_service_level_copy ()
const gchar * | modulemd_service_level_get_name ()
void | modulemd_service_level_set_eol ()
void | modulemd_service_level_set_eol_ymd ()
void | modulemd_service_level_remove_eol ()
GDate * | modulemd_service_level_get_eol ()
gchar * | modulemd_service_level_get_eol_as_string ()
gboolean | modulemd_service_level_equals ()

## Properties

char * | name | Read / Write / Construct Only

## Types and Values

#define | MODULEMD_TYPE_SERVICE_LEVEL
| ModulemdServiceLevel

## Object Hierarchy

        GObject
        ╰── ModulemdServiceLevel

## Description

## Functions

### modulemd_service_level_new ()

    ModulemdServiceLevel *
    modulemd_service_level_new (const gchar *name);

#### Parameters

name | The name of the service level. | [not nullable]

#### Returns

A newly-allocated ModulemdServiceLevel object. This object must be freed with `g_object_unref()`.

[transfer full]

Since: 2.0

### modulemd_service_level_copy ()

    ModulemdServiceLevel *
    modulemd_service_level_copy (ModulemdServiceLevel *self);

Create a copy of this ModulemdServiceLevel object.

#### Parameters

self | This ModulemdServiceLevel object. |

#### Returns

The copied ModulemdServiceLevel object.

[transfer full]

Since: 2.0

### modulemd_service_level_get_name ()

    const gchar *
    modulemd_service_level_get_name (ModulemdServiceLevel *self);

Get the name of this service level.

#### Parameters

self | This ModulemdServiceLevel object. |

#### Returns

The name of this service level. This is a pointer to the internal memory location and must not be freed.

[transfer none]

Since: 2.0

### modulemd_service_level_set_eol ()

    void
    modulemd_service_level_set_eol (ModulemdServiceLevel *self,
                                    GDate *date);

Sets the end date of the service level. If the GDate passed in is invalid or NULL, the EOL will be unset.

#### Parameters

self | This ModulemdServiceLevel object. |
date | The date this service level ends. | [nullable]

Since: 2.0

### modulemd_service_level_set_eol_ymd ()

    void
    modulemd_service_level_set_eol_ymd (ModulemdServiceLevel *self,
                                        GDateYear year,
                                        GDateMonth month,
                                        GDateDay day);

#### Parameters

self | This ModulemdServiceLevel object. |
year | The year this service level ends. |
month | The month this service level ends. |
day | The day of the month this service level ends. |

Since: 2.0

### modulemd_service_level_remove_eol ()

    void
    modulemd_service_level_remove_eol (ModulemdServiceLevel *self);

Remove the EOL from this Service Level.

#### Parameters

self | This ModulemdServiceLevel object. |

Since: 2.0

### modulemd_service_level_get_eol ()

    GDate *
    modulemd_service_level_get_eol (ModulemdServiceLevel *self);

#### Parameters

self | This ModulemdServiceLevel object. |

#### Returns

The end date of the service level as a GDate.

[transfer none]

Since: 2.0

### modulemd_service_level_get_eol_as_string ()

    gchar *
    modulemd_service_level_get_eol_as_string
                                   (ModulemdServiceLevel *self);

#### Parameters

self | This ModulemdServiceLevel object. |

#### Returns

The end date of the service level as a string of the form "YYYY-MM-DD" or NULL if the date is unset or invalid.

[transfer full][nullable]

Since: 2.0

### modulemd_service_level_equals ()

    gboolean
    modulemd_service_level_equals (ModulemdServiceLevel *self_1,
                                   ModulemdServiceLevel *self_2);

#### Parameters

self_1 | A ModulemdServiceLevel object. |
self_2 | A ModulemdServiceLevel object. |

#### Returns

TRUE if both the dates are either NULL or valid, FALSE otherwise.

Since: 2.2

## Types and Values

### MODULEMD_TYPE_SERVICE_LEVEL

    #define MODULEMD_TYPE_SERVICE_LEVEL (modulemd_service_level_get_type ())

### ModulemdServiceLevel

    typedef struct _ModulemdServiceLevel ModulemdServiceLevel;

## Property Details

### The `“name”` property

      “name”                     char *

A human-readable name for this servicelevel.

Owner: ModulemdServiceLevel

Flags: Read / Write / Construct Only

Default value: "__NAME_UNSET__"