/** * @param id lists snapshot by snapshot ID */ public static ListSnapshotsOptions id(String id) { return new ListSnapshotsOptions().id(id); }
/** * @param interval valid values are HOURLY, DAILY, WEEKLY, and MONTHLY. */ public static ListSnapshotsOptions interval(Snapshot.Interval interval) { return new ListSnapshotsOptions().interval(interval); }
/** * @param isRecursive defaults to false, but if true, lists all snapshots from the parent specified by the domain id till leaves. */ public static ListSnapshotsOptions isRecursive(boolean isRecursive) { return new ListSnapshotsOptions().isRecursive(isRecursive); }
/** * @param snapshotType valid values are MANUAL or RECURRING. */ public static ListSnapshotsOptions snapshotType(Snapshot.Type snapshotType) { return new ListSnapshotsOptions().snapshotType(snapshotType); }
/** * @param domainId the domain ID. */ public static ListSnapshotsOptions domainId(String domainId) { return (ListSnapshotsOptions) new ListSnapshotsOptions().domainId(domainId); }
public void testListSnapshotsOptions() throws NoSuchMethodException { Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshots", ListSnapshotsOptions[].class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListSnapshotsOptions.Builder.accountInDomain("acc", "7").id("5").interval(Snapshot.Interval.MONTHLY).isRecursive(true).keyword("fred").name("fred's snapshot").snapshotType(Snapshot.Type.RECURRING).volumeId("11"))); assertRequestLineEquals(httpRequest, "GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&account=acc&domainid=7&id=5&intervaltype=MONTHLY&isrecursive=true&keyword=fred&name=fred%27s%20snapshot&snapshottype=RECURRING&volumeid=11 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class); checkFilters(httpRequest); }
/** * @param name lists snapshot by snapshot name */ public static ListSnapshotsOptions name(String name) { return new ListSnapshotsOptions().name(name); }
/** * @param volumeId the ID of the disk volume */ public static ListSnapshotsOptions volumeId(String volumeId) { return new ListSnapshotsOptions().volumeId(volumeId); } }
/** * @param keyword List by keyword */ public static ListSnapshotsOptions keyword(String keyword) { return new ListSnapshotsOptions().keyword(keyword); }
/** * @param account lists snapshot belonging to the specified account. * @param domainId The domain ID. */ public static ListSnapshotsOptions accountInDomain(String account, String domainId) { return (ListSnapshotsOptions) new ListSnapshotsOptions().accountInDomain(account, domainId); }
/** * @param projectId the project to list in */ public static ListSnapshotsOptions projectId(String projectId) { return new ListSnapshotsOptions().projectId(projectId); }
/** * @see org.jclouds.cloudstack.options.ListSnapshotsOptions#tags(java.util.Map) */ public static ListSnapshotsOptions tags(Map<String, String> tags) { return new ListSnapshotsOptions().tags(tags); } }
public void testListSnapshotsOptions() throws NoSuchMethodException { Invokable<?, ?> method = method(SnapshotApi.class, "listSnapshots", ListSnapshotsOptions[].class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListSnapshotsOptions.Builder.accountInDomain("acc", "7") .id("5") .interval(Snapshot.Interval.MONTHLY) .isRecursive(true) .keyword("fred") .name("fred's snapshot") .snapshotType(Snapshot.Type.RECURRING) .volumeId("11"))); assertRequestLineEquals(httpRequest, "GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&account=acc&domainid=7&id=5&intervaltype=MONTHLY&isrecursive=true&keyword=fred&name=fred%27s%20snapshot&snapshottype=RECURRING&volumeid=11 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class); checkFilters(httpRequest); }
/** * @param snapshotType valid values are MANUAL or RECURRING. */ public static ListSnapshotsOptions snapshotType(Snapshot.Type snapshotType) { return new ListSnapshotsOptions().snapshotType(snapshotType); }
/** * @param name lists snapshot by snapshot name */ public static ListSnapshotsOptions name(String name) { return new ListSnapshotsOptions().name(name); }
/** * @param volumeId the ID of the disk volume */ public static ListSnapshotsOptions volumeId(String volumeId) { return new ListSnapshotsOptions().volumeId(volumeId); } }
/** * @param keyword List by keyword */ public static ListSnapshotsOptions keyword(String keyword) { return new ListSnapshotsOptions().keyword(keyword); }
/** * @param domainId the domain ID. */ public static ListSnapshotsOptions domainId(String domainId) { return (ListSnapshotsOptions) new ListSnapshotsOptions().domainId(domainId); }
/** * @param account lists snapshot belonging to the specified account. * @param domainId The domain ID. */ public static ListSnapshotsOptions accountInDomain(String account, String domainId) { return (ListSnapshotsOptions) new ListSnapshotsOptions().accountInDomain(account, domainId); }
/** * @param id lists snapshot by snapshot ID */ public static ListSnapshotsOptions id(String id) { return new ListSnapshotsOptions().id(id); }