com.azure.resourcemanager.security.models.GitLabProjectProperties Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.models;
import com.azure.core.annotation.Fluent;
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;
/**
* GitLab Project properties.
*/
@Fluent
public final class GitLabProjectProperties implements JsonSerializable {
/*
* Gets the resource status message.
*/
private String provisioningStatusMessage;
/*
* Gets the time when resource was last checked.
*/
private OffsetDateTime provisioningStatusUpdateTimeUtc;
/*
* The provisioning state of the resource.
*
* Pending - Provisioning pending.
* Failed - Provisioning failed.
* Succeeded - Successful provisioning.
* Canceled - Provisioning canceled.
* PendingDeletion - Deletion pending.
* DeletionSuccess - Deletion successful.
* DeletionFailure - Deletion failure.
*/
private DevOpsProvisioningState provisioningState;
/*
* Gets or sets the fully-qualified name of the project object.
*
* This contains the entire hierarchy where entities are separated by the '$' character.
*/
private String fullyQualifiedName;
/*
* Gets or sets the human readable fully-qualified name of the Project object.
*
* This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/'
* character.
*/
private String fullyQualifiedFriendlyName;
/*
* Gets or sets the fully-qualified name of the project's parent group object.
*
* This contains the entire hierarchy where namespaces are separated by the '$' character.
*/
private String fullyQualifiedParentGroupName;
/*
* Gets or sets the url of the GitLab Project.
*/
private String url;
/*
* Details about resource onboarding status across all connectors.
*
* OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only
* applicable to top-level resources.
* Onboarded - this resource has already been onboarded by the specified connector.
* NotOnboarded - this resource has not been onboarded to any connector.
* NotApplicable - the onboarding state is not applicable to the current endpoint.
*/
private OnboardingState onboardingState;
/**
* Creates an instance of GitLabProjectProperties class.
*/
public GitLabProjectProperties() {
}
/**
* Get the provisioningStatusMessage property: Gets the resource status message.
*
* @return the provisioningStatusMessage value.
*/
public String provisioningStatusMessage() {
return this.provisioningStatusMessage;
}
/**
* Get the provisioningStatusUpdateTimeUtc property: Gets the time when resource was last checked.
*
* @return the provisioningStatusUpdateTimeUtc value.
*/
public OffsetDateTime provisioningStatusUpdateTimeUtc() {
return this.provisioningStatusUpdateTimeUtc;
}
/**
* Get the provisioningState property: The provisioning state of the resource.
*
* Pending - Provisioning pending.
* Failed - Provisioning failed.
* Succeeded - Successful provisioning.
* Canceled - Provisioning canceled.
* PendingDeletion - Deletion pending.
* DeletionSuccess - Deletion successful.
* DeletionFailure - Deletion failure.
*
* @return the provisioningState value.
*/
public DevOpsProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Get the fullyQualifiedName property: Gets or sets the fully-qualified name of the project object.
*
* This contains the entire hierarchy where entities are separated by the '$' character.
*
* @return the fullyQualifiedName value.
*/
public String fullyQualifiedName() {
return this.fullyQualifiedName;
}
/**
* Get the fullyQualifiedFriendlyName property: Gets or sets the human readable fully-qualified name of the Project
* object.
*
* This contains the entire namespace hierarchy as seen on GitLab UI where entities are separated by the '/'
* character.
*
* @return the fullyQualifiedFriendlyName value.
*/
public String fullyQualifiedFriendlyName() {
return this.fullyQualifiedFriendlyName;
}
/**
* Get the fullyQualifiedParentGroupName property: Gets or sets the fully-qualified name of the project's parent
* group object.
*
* This contains the entire hierarchy where namespaces are separated by the '$' character.
*
* @return the fullyQualifiedParentGroupName value.
*/
public String fullyQualifiedParentGroupName() {
return this.fullyQualifiedParentGroupName;
}
/**
* Get the url property: Gets or sets the url of the GitLab Project.
*
* @return the url value.
*/
public String url() {
return this.url;
}
/**
* Get the onboardingState property: Details about resource onboarding status across all connectors.
*
* OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only
* applicable to top-level resources.
* Onboarded - this resource has already been onboarded by the specified connector.
* NotOnboarded - this resource has not been onboarded to any connector.
* NotApplicable - the onboarding state is not applicable to the current endpoint.
*
* @return the onboardingState value.
*/
public OnboardingState onboardingState() {
return this.onboardingState;
}
/**
* Set the onboardingState property: Details about resource onboarding status across all connectors.
*
* OnboardedByOtherConnector - this resource has already been onboarded to another connector. This is only
* applicable to top-level resources.
* Onboarded - this resource has already been onboarded by the specified connector.
* NotOnboarded - this resource has not been onboarded to any connector.
* NotApplicable - the onboarding state is not applicable to the current endpoint.
*
* @param onboardingState the onboardingState value to set.
* @return the GitLabProjectProperties object itself.
*/
public GitLabProjectProperties withOnboardingState(OnboardingState onboardingState) {
this.onboardingState = onboardingState;
return this;
}
/**
* 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();
jsonWriter.writeStringField("onboardingState",
this.onboardingState == null ? null : this.onboardingState.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of GitLabProjectProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of GitLabProjectProperties 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 GitLabProjectProperties.
*/
public static GitLabProjectProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
GitLabProjectProperties deserializedGitLabProjectProperties = new GitLabProjectProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("provisioningStatusMessage".equals(fieldName)) {
deserializedGitLabProjectProperties.provisioningStatusMessage = reader.getString();
} else if ("provisioningStatusUpdateTimeUtc".equals(fieldName)) {
deserializedGitLabProjectProperties.provisioningStatusUpdateTimeUtc = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("provisioningState".equals(fieldName)) {
deserializedGitLabProjectProperties.provisioningState
= DevOpsProvisioningState.fromString(reader.getString());
} else if ("fullyQualifiedName".equals(fieldName)) {
deserializedGitLabProjectProperties.fullyQualifiedName = reader.getString();
} else if ("fullyQualifiedFriendlyName".equals(fieldName)) {
deserializedGitLabProjectProperties.fullyQualifiedFriendlyName = reader.getString();
} else if ("fullyQualifiedParentGroupName".equals(fieldName)) {
deserializedGitLabProjectProperties.fullyQualifiedParentGroupName = reader.getString();
} else if ("url".equals(fieldName)) {
deserializedGitLabProjectProperties.url = reader.getString();
} else if ("onboardingState".equals(fieldName)) {
deserializedGitLabProjectProperties.onboardingState
= OnboardingState.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedGitLabProjectProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy