Skip to content

feat(2022-07-13): updated the sdk as per the api spec released on 2022-07-13 for backup and vpn servers #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<module name="NewlineAtEndOfFile"/>
<module name="FileLength">
<property name="max" value="10000"/>
<property name="max" value="100000"/>
</module>
<module name="FileTabCharacter"/>

Expand Down
569 changes: 528 additions & 41 deletions modules/examples/src/main/java/com/ibm/cloud/is/vpc/v1/VPCExamples.java

Large diffs are not rendered by default.

1,024 changes: 949 additions & 75 deletions modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* (C) Copyright IBM Corp. 2020, 2021, 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.is.vpc.v1.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* The addSecurityGroupTarget options.
*/
public class AddSecurityGroupTargetOptions extends GenericModel {

protected String securityGroupId;
protected String id;

/**
* Builder.
*/
public static class Builder {
private String securityGroupId;
private String id;

private Builder(AddSecurityGroupTargetOptions addSecurityGroupTargetOptions) {
this.securityGroupId = addSecurityGroupTargetOptions.securityGroupId;
this.id = addSecurityGroupTargetOptions.id;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Instantiates a new builder with required properties.
*
* @param securityGroupId the securityGroupId
* @param id the id
*/
public Builder(String securityGroupId, String id) {
this.securityGroupId = securityGroupId;
this.id = id;
}

/**
* Builds a AddSecurityGroupTargetOptions.
*
* @return the new AddSecurityGroupTargetOptions instance
*/
public AddSecurityGroupTargetOptions build() {
return new AddSecurityGroupTargetOptions(this);
}

/**
* Set the securityGroupId.
*
* @param securityGroupId the securityGroupId
* @return the AddSecurityGroupTargetOptions builder
*/
public Builder securityGroupId(String securityGroupId) {
this.securityGroupId = securityGroupId;
return this;
}

/**
* Set the id.
*
* @param id the id
* @return the AddSecurityGroupTargetOptions builder
*/
public Builder id(String id) {
this.id = id;
return this;
}
}

protected AddSecurityGroupTargetOptions(Builder builder) {
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.securityGroupId,
"securityGroupId cannot be empty");
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.id,
"id cannot be empty");
securityGroupId = builder.securityGroupId;
id = builder.id;
}

/**
* New builder.
*
* @return a AddSecurityGroupTargetOptions builder
*/
public Builder newBuilder() {
return new Builder(this);
}

/**
* Gets the securityGroupId.
*
* The security group identifier.
*
* @return the securityGroupId
*/
public String securityGroupId() {
return securityGroupId;
}

/**
* Gets the id.
*
* The security group target identifier.
*
* @return the id
*/
public String id() {
return id;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
/*
* (C) Copyright IBM Corp. 2020, 2021, 2022.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.is.vpc.v1.model;

import java.util.Date;
import java.util.List;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* BackupPolicy.
*/
public class BackupPolicy extends GenericModel {

/**
* The lifecycle state of the backup policy.
*/
public interface LifecycleState {
/** deleting. */
String DELETING = "deleting";
/** failed. */
String FAILED = "failed";
/** pending. */
String PENDING = "pending";
/** stable. */
String STABLE = "stable";
/** suspended. */
String SUSPENDED = "suspended";
/** updating. */
String UPDATING = "updating";
/** waiting. */
String WAITING = "waiting";
}

/**
* The resource type.
*/
public interface MatchResourceTypes {
/** volume. */
String VOLUME = "volume";
}

/**
* The resource type.
*/
public interface ResourceType {
/** backup_policy. */
String BACKUP_POLICY = "backup_policy";
}

@SerializedName("created_at")
protected Date createdAt;
protected String crn;
protected String href;
protected String id;
@SerializedName("last_job_completed_at")
protected Date lastJobCompletedAt;
@SerializedName("lifecycle_state")
protected String lifecycleState;
@SerializedName("match_resource_types")
protected List<String> matchResourceTypes;
@SerializedName("match_user_tags")
protected List<String> matchUserTags;
protected String name;
protected List<BackupPolicyPlanReference> plans;
@SerializedName("resource_group")
protected ResourceGroupReference resourceGroup;
@SerializedName("resource_type")
protected String resourceType;

/**
* Gets the createdAt.
*
* The date and time that the backup policy was created.
*
* @return the createdAt
*/
public Date getCreatedAt() {
return createdAt;
}

/**
* Gets the crn.
*
* The CRN for this backup policy.
*
* @return the crn
*/
public String getCrn() {
return crn;
}

/**
* Gets the href.
*
* The URL for this backup policy.
*
* @return the href
*/
public String getHref() {
return href;
}

/**
* Gets the id.
*
* The unique identifier for this backup policy.
*
* @return the id
*/
public String getId() {
return id;
}

/**
* Gets the lastJobCompletedAt.
*
* The date and time that the most recent job for this backup policy completed.
*
* If absent, no job has yet completed for this backup policy.
*
* @return the lastJobCompletedAt
*/
public Date getLastJobCompletedAt() {
return lastJobCompletedAt;
}

/**
* Gets the lifecycleState.
*
* The lifecycle state of the backup policy.
*
* @return the lifecycleState
*/
public String getLifecycleState() {
return lifecycleState;
}

/**
* Gets the matchResourceTypes.
*
* A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag
* will be subject to the backup policy.
*
* The enumerated values for this property will expand in the future. When processing this property, check for and log
* unknown values. Optionally halt processing and surface the error, or bypass the backup policy on which the
* unexpected property value was encountered.
*
* @return the matchResourceTypes
*/
public List<String> getMatchResourceTypes() {
return matchResourceTypes;
}

/**
* Gets the matchUserTags.
*
* The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will
* be subject to the backup policy.
*
* @return the matchUserTags
*/
public List<String> getMatchUserTags() {
return matchUserTags;
}

/**
* Gets the name.
*
* The unique user-defined name for this backup policy.
*
* @return the name
*/
public String getName() {
return name;
}

/**
* Gets the plans.
*
* The plans for the backup policy.
*
* @return the plans
*/
public List<BackupPolicyPlanReference> getPlans() {
return plans;
}

/**
* Gets the resourceGroup.
*
* The resource group for this backup policy.
*
* @return the resourceGroup
*/
public ResourceGroupReference getResourceGroup() {
return resourceGroup;
}

/**
* Gets the resourceType.
*
* The resource type.
*
* @return the resourceType
*/
public String getResourceType() {
return resourceType;
}
}

Loading