io.fabric8.kubernetes.api.model.ListMeta Java Examples

The following examples show how to use io.fabric8.kubernetes.api.model.ListMeta. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceMonitorList.java    From dekorate with Apache License 2.0 5 votes vote down vote up
public ServiceMonitorList(String apiVersion, List<ServiceMonitor> items, String kind, ListMeta metadata, Map<String, Object> additionalProperties) {
  this.apiVersion = apiVersion;
  this.items = items;
  this.kind = kind;
  this.metadata = metadata;
  this.additionalProperties = additionalProperties;
}
 
Example #2
Source File: IstioResourceList.java    From istio-java-api with Apache License 2.0 5 votes vote down vote up
/**
 * @param metadata
 * @param apiVersion
 * @param kind
 * @param items
 */
public IstioResourceList(String apiVersion, List<IstioResource> items, String kind, ListMeta metadata) {
    this.apiVersion = apiVersion;
    this.items = items;
    this.kind = kind;
    this.metadata = metadata;
}
 
Example #3
Source File: KubernetesDockerRunnerPodPollerTest.java    From styx with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() {
  when(debug.get()).thenReturn(false);

  podList = new PodList();
  podList.setMetadata(new ListMeta());
  podList.getMetadata().setResourceVersion("4711");

  when(k8sClient.getPod(any())).thenReturn(Optional.empty());
  when(k8sClient.listPods()).thenReturn(podList);

  kdr = new KubernetesDockerRunner("test", k8sClient, stateManager, stats, serviceAccountSecretManager,
      debug, STYX_ENVIRONMENT, Set.of());
}
 
Example #4
Source File: Table.java    From enmasse with Apache License 2.0 5 votes vote down vote up
@JsonCreator
public Table(@JsonProperty("metadata") ListMeta metadata,
             @JsonProperty("columnDefinitions") List<TableColumnDefinition> columnDefinitions,
             @JsonProperty("rows") List<TableRow> rows) {
    this.metadata = metadata;
    this.columnDefinitions = columnDefinitions;
    this.rows = rows;
}
 
Example #5
Source File: ReflectUtils.java    From kubernetes-client with Apache License 2.0 5 votes vote down vote up
public static ListMeta listMetadata(Object listObj) throws ReflectiveOperationException {
  if (listObj instanceof KubernetesResourceList) {
    return ((KubernetesResourceList<?>) listObj).getMetadata();
  }
  try {
    Method mdField = listObj.getClass().getMethod("getMetadata");
    return (ListMeta) mdField.invoke(listObj);
  } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
    throw new ReflectiveOperationException(e);
  }
}
 
Example #6
Source File: ServiceMonitorList.java    From dekorate with Apache License 2.0 4 votes vote down vote up
@Override
public ListMeta getMetadata() {
  return metadata;
}
 
Example #7
Source File: ServiceMonitorList.java    From dekorate with Apache License 2.0 4 votes vote down vote up
public void setMetadata(ListMeta metadata) {
  this.metadata = metadata;
}
 
Example #8
Source File: IstioResourceList.java    From istio-java-api with Apache License 2.0 4 votes vote down vote up
/**
 * @return The metadata
 */
@JsonProperty("metadata")
public ListMeta getMetadata() {
    return metadata;
}
 
Example #9
Source File: IstioResourceList.java    From istio-java-api with Apache License 2.0 4 votes vote down vote up
/**
 * @param metadata The metadata
 */
@JsonProperty("metadata")
public void setMetadata(ListMeta metadata) {
    this.metadata = metadata;
}
 
Example #10
Source File: Table.java    From enmasse with Apache License 2.0 4 votes vote down vote up
public ListMeta getMetadata() {
    return metadata;
}
 
Example #11
Source File: Table.java    From enmasse with Apache License 2.0 4 votes vote down vote up
public void setMetadata(ListMeta metadata) {
    this.metadata = metadata;
}
 
Example #12
Source File: AbstractList.java    From enmasse with Apache License 2.0 4 votes vote down vote up
public void setMetadata(final ListMeta metadata) {
    this.metadata = metadata;
}
 
Example #13
Source File: AbstractList.java    From enmasse with Apache License 2.0 4 votes vote down vote up
@Override
public ListMeta getMetadata() {
    return this.metadata;
}
 
Example #14
Source File: CustomResourceList.java    From kubernetes-client with Apache License 2.0 4 votes vote down vote up
@Override
public ListMeta getMetadata() {
  return metadata;
}
 
Example #15
Source File: CustomResourceList.java    From kubernetes-client with Apache License 2.0 4 votes vote down vote up
public void setMetadata(ListMeta metadata) {
  this.metadata = metadata;
}