All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09.

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.securityinsights.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;

/**
 * Describes team information.
 */
@Immutable
public final class TeamInformationInner implements JsonSerializable {
    /*
     * Team ID
     */
    private String teamId;

    /*
     * The primary channel URL of the team
     */
    private String primaryChannelUrl;

    /*
     * The time the team was created
     */
    private OffsetDateTime teamCreationTimeUtc;

    /*
     * The name of the team
     */
    private String name;

    /*
     * The description of the team
     */
    private String description;

    /**
     * Creates an instance of TeamInformationInner class.
     */
    public TeamInformationInner() {
    }

    /**
     * Get the teamId property: Team ID.
     * 
     * @return the teamId value.
     */
    public String teamId() {
        return this.teamId;
    }

    /**
     * Get the primaryChannelUrl property: The primary channel URL of the team.
     * 
     * @return the primaryChannelUrl value.
     */
    public String primaryChannelUrl() {
        return this.primaryChannelUrl;
    }

    /**
     * Get the teamCreationTimeUtc property: The time the team was created.
     * 
     * @return the teamCreationTimeUtc value.
     */
    public OffsetDateTime teamCreationTimeUtc() {
        return this.teamCreationTimeUtc;
    }

    /**
     * Get the name property: The name of the team.
     * 
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the description property: The description of the team.
     * 
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of TeamInformationInner from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of TeamInformationInner if the JsonReader was pointing to an instance of it, or null if it
     * was pointing to JSON null.
     * @throws IOException If an error occurs while reading the TeamInformationInner.
     */
    public static TeamInformationInner fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            TeamInformationInner deserializedTeamInformationInner = new TeamInformationInner();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("teamId".equals(fieldName)) {
                    deserializedTeamInformationInner.teamId = reader.getString();
                } else if ("primaryChannelUrl".equals(fieldName)) {
                    deserializedTeamInformationInner.primaryChannelUrl = reader.getString();
                } else if ("teamCreationTimeUtc".equals(fieldName)) {
                    deserializedTeamInformationInner.teamCreationTimeUtc = reader
                        .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
                } else if ("name".equals(fieldName)) {
                    deserializedTeamInformationInner.name = reader.getString();
                } else if ("description".equals(fieldName)) {
                    deserializedTeamInformationInner.description = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedTeamInformationInner;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy