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

com.spotinst.sdkjava.model.requests.azure.statefulNode.StatefulNodeAttachDataDiskRequest Maven / Gradle / Ivy

There is a newer version: 1.0.121
Show newest version
package com.spotinst.sdkjava.model.requests.azure.statefulNode;

import com.spotinst.sdkjava.client.rest.JsonMapper;
import com.spotinst.sdkjava.model.api.azure.statefulNode.ApiStatefulNodeAttachDataDiskConfiguration;
import com.spotinst.sdkjava.model.bl.azure.statefulNode.StatefulNodeAttachDataDiskConfiguration;
import com.spotinst.sdkjava.model.converters.azure.statefulNode.StatefulNodeConverter;

import java.util.HashMap;
import java.util.Map;

public class StatefulNodeAttachDataDiskRequest {

        private StatefulNodeAttachDataDiskConfiguration attachDataDisk;

        private StatefulNodeAttachDataDiskRequest(){
        }

        public StatefulNodeAttachDataDiskConfiguration getAttachDataDisk() {
            return attachDataDisk;
        }

        public void setAttachDataDisk(StatefulNodeAttachDataDiskConfiguration attachDataDisk) {
            this.attachDataDisk = attachDataDisk;
        }

        public static class Builder {
            private StatefulNodeAttachDataDiskRequest attachDiskRequest;

            private Builder() {
                this.attachDiskRequest = new StatefulNodeAttachDataDiskRequest();
            }

            public static Builder get() {
                return new Builder();
            }

            public Builder setAttachDataDisk(final StatefulNodeAttachDataDiskConfiguration attachDataDisk) {
                attachDiskRequest.setAttachDataDisk(attachDataDisk);
                return this;
            }

            public StatefulNodeAttachDataDiskRequest build() {
                return attachDiskRequest;
            }

        }



        public String toJson() {
            ApiStatefulNodeAttachDataDiskConfiguration apiStatefulNodeToAttach = StatefulNodeConverter.toDal(attachDataDisk);
            Map diskRequest             = new HashMap<>();
            return JsonMapper.toJson(diskRequest);
        }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy